package com.idealighter.game.games.foursshop.struct;

/**
 * 下注类型 .
 */
public enum BetType {
  TEN_MILLION(1, 10000000), MILLION(2, 1000000), HUNDRED_THOUSAND(3, 100000), TEN_THOUSAND(4,
      10000), THOUSAND(5, 1000), HUNDRED(6, 100), TEN(7, 10), ONE(8, 1);

  public final int type;
  public final int value;

  /**
   * 下注类型.
   * 
   * @param type .
   * @param desc .
   */
  private BetType(int type, int desc) {
    this.type = type;
    this.value = desc;
  }

  /**
   * 获取数值.
   * 
   * @param type .
   * @return
   * 
   */
  public static BetType getValue(int type) {
    for (BetType callType : BetType.values()) {
      if (callType.type == type) {
        return callType;
      }
    }
    return BetType.ONE;
  }


  @Override
  public String toString() {
    return name() + "(" + value + ")";
  }
}
